﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace task1
{
    class Program
    {
        static void Main(string[] args)
        {
            OrderService orderService = new OrderService();

            Commodity c1 = new Commodity("c1", 111);     // 为了便于CRUD，把这些变量作为类成员
            Commodity c2 = new Commodity("c2", 2221);
            Commodity c3 = new Commodity("c3", 28112);
            Commodity c4 = new Commodity("c4", 1000);

            Customer Ava = new Customer("Ava", 17);
            Customer Bella = new Customer("bella", 19);
            Customer Carol = new Customer("Carol", 19);

            OrderDetail od1 = new OrderDetail(c1, 5, 0.9F);
            OrderDetail od2 = new OrderDetail(c2, 1);
            OrderDetail od3 = new OrderDetail(c3, 6);
            OrderDetail od4 = new OrderDetail(c4, 1, 0.75F);

            Order order1 = new Order();
            Order order2 = new Order();

            order1.Id = 1;
            order1.Customer = Ava;       
            order1.AddOrderDetail(od1);
            order1.AddOrderDetail(od2);

            order2.Id = 2;
            order2.Customer = Bella;    
            order2.AddOrderDetail(od3);

            orderService.AddOrder(order2);  
            orderService.AddOrder(order1);
            
            OrderService.
        }
    }
}